//
//  BBNoPictureCell.swift
//  BaoKanSwift
//
//  Created by uncle-R on 16/6/12.
//  Copyright © 2016年 uncle-R. All rights reserved.
//

import UIKit

class BBNoPictureCell: UITableViewCell {

    @IBOutlet weak var title: UILabel!
    
    @IBOutlet weak var time: UILabel!
    
    @IBOutlet weak var comment: UILabel!
    
    @IBOutlet weak var looked: UILabel!
    
    var model :BBNewsModel? {
        
        didSet{
            self.title.text = model?.title!
            self.time.text = model?.newstime!
            self.comment.text = model?.plnum!
            self.looked.text = model?.onclick!
        }
    }
    
    func getRowHeight(model: BBNewsModel) -> CGFloat {
        layoutIfNeeded() //更新约束
        model.rowHeight = CGRectGetMaxY(time.frame) + 40
        return model.rowHeight
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        selectionStyle = UITableViewCellSelectionStyle.None
        
    }
    
}
